// 头部控制器（用户登录状态显示用户名及退出登录否则进入登录页）
define('headerController', ['angular'], function (angular) {
    var module = angular.module('controllers');
    module.controller('headerController', ['$scope','$rootScope','$location', '$window','AuthenticationService',function ($scope,$rootScope,$location,$window,AuthenticationService) {
    	$scope.logout = function() {
            AuthenticationService.isLogged = false;
            delete $window.sessionStorage.token;
            $location.path("/login");
        };
    }]);
});